#pragma once
#include "Epoll.h"
#include "Channel.h"

class Epoll;
class Channel;

class EventLoop
{
private:
    Epoll *ep_;
    std::function<void(EventLoop *)> epolltimeoutcallback_;
public:
    EventLoop();
    ~EventLoop();

    void run();

    Epoll* ep();


    void updatechannel(Channel *ch);

    void setepolltimeoutcallback(std::function<void(EventLoop *)>);

};
